]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dateMenu: Ignore malformed world-clocks settings
authorBastien Nocera <hadess@hadess.net>
Mon, 4 Dec 2017 13:30:01 +0000 (14:30 +0100)
committerBastien Nocera <hadess@hadess.net>
Wed, 6 Dec 2017 01:02:48 +0000 (02:02 +0100)
Guard against a malformed setting that doesn't contain a
'location' key.

https://bugzilla.gnome.org/show_bug.cgi?id=791148

js/ui/dateMenu.js

index 1d48fa8bd428398a2d685533a087f7b08298897d..5908c904f4e96769384087e298a5e1fc7bbdf183 100644 (file)
@@ -132,6 +132,8 @@ var WorldClocksSection = new Lang.Class({
         let world = GWeather.Location.get_world();
         let clocks = settings.get_value('world-clocks').deep_unpack();
         for (let i = 0; i < clocks.length; i++) {
+            if (!clocks[i].location)
+                continue;
             let l = world.deserialize(clocks[i].location);
             this._locations.push({ location: l });
         }